using Microsoft.AspNetCore.Mvc.Filters;

namespace Geekeradmin.Filters
{
    public class CustomCorsAction : Attribute, IActionFilter
    {
        public void OnActionExecuting(ActionExecutingContext context)
        {
            context.HttpContext.Response.Headers.Add("Access-Control-Allow-Origin", "*");
        }

        public void OnActionExecuted(ActionExecutedContext context)
        {

        }

    }
}
